Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pool ActiveQuerys in the query stack #629

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Dec 13, 2024

ActiveQuery is 192 bytes and has a couple of collections within it (2 of which are not extract) that we can potentially re-use the allocations for. So pooling those instead of creating, pushing and popping the query from the stack might be beneficial to perf.

Seems like we have small perf improvements.

Builds on top of #626

…wind`

This commit changes `Edge` such that it no longer takes direct ownership of the query stack and instead keeps a lifetime erased mutable slice, an exclusive borrow and as such the ownership model does not change.
The caller now does have to uphold the safety invariant that the query stack borrow is life for the entire computation which is trivially achievable as the caller will block until the computation as done.
Copy link

netlify bot commented Dec 13, 2024

Deploy Preview for salsa-rs canceled.

Name Link
🔨 Latest commit acbb79e
🔍 Latest deploy log https://app.netlify.com/sites/salsa-rs/deploys/675c607ae4038d000883ebf9

Copy link

codspeed-hq bot commented Dec 13, 2024

CodSpeed Performance Report

Merging #629 will not alter performance

Comparing Veykril:veykril/push-vznumyusmzww (acbb79e) with master (5cd2b63)

Summary

✅ 9 untouched benchmarks

@Veykril Veykril changed the title Do not pass ownership of the QueryStack in `Runtime::block_on_or_un… Pool ActiveQuerys in the query stack Dec 13, 2024
@Veykril Veykril marked this pull request as ready for review December 14, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant